package com.chance.cc.crawler.development.command.schedule.douyin.api;

import com.chance.cc.crawler.development.command.schedule.CrawlerJobScheduleCommand;

/**
 * @author bx
 * @date 2020/12/7 0007 10:23
 */
public class DYApiCrawlerJobSchedule {

    private static CrawlerJobScheduleCommand crawlerJobScheduleCommand =
            new CrawlerJobScheduleCommand("192.168.1.215",9589);

    public static void main(String[] args) {
//        publishDYAPICrawlerJobInfo(DYAccountCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());
//
//        publishDYAPICrawlerJobInfo(DYSearchCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());

//        publishDYAPICrawlerJobInfo(DYSearchZDCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());

//        publishDYAPICrawlerJobInfo(DYCommentCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());

//        publishDYAPICrawlerJobInfo(DYAccountCustomCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());
//
//        publishDYAPICrawlerJobInfo(DYCommentCustomCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());

//        publishDYAPICrawlerJobInfo(DYSearchCustomCrawlerScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());

//        publishDYAPICrawlerJobInfo(DYDevicesRegisterScheduleJob.dyCrawlerSchduler().generateCrawlerTriggerKey());
    }

    public static void publishDYAPICrawlerJobInfo(String triggerKey){
        publishDYAPICrawlerJobInfo(triggerKey,"crawler_dev_host");
    }

    public static void publishDYAPICrawlerJobInfo(String triggerKey,String deviceName){
        crawlerJobScheduleCommand.republishCrawlerJob(triggerKey,deviceName);
    }

    public static void deleteCrawlerJob(String triggerKey){
        crawlerJobScheduleCommand.deleteCrawlerJob(triggerKey,"crawler_dev_host");
    }

}
